package com.kun.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.kun.entity.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * 用户表
 * @author kun.li
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName
public class SysUser extends BaseEntity {

    @TableId
    @Schema(description = "用户ID")
    private String userId;
    /**
     * 租户ID
     */
    private String tenantId;


    @Schema(description = "用户名称")
    private String username;
    /**
     *真实名字
     */
    @Schema(description = "废除字段")
    private String realName;

    @Schema(description = "密码")
    private String password;

    @Schema(description = "描述")
    private String remark;

    @Schema(description = "用户状态 0 启用 1 锁定")
    private Integer state;

    @Schema(description = "用户别名")
    private String userAlias;

    @Schema(description = "用户对应部门ID")
    private String deptId;

    @Schema(description = "是否是默认管理员")
    private Integer hasAdmin;


    @TableField(exist = false)
    private List<SysRole> roles;

    @TableField(exist = false)
    private List<String> btnPermission;




}
